![]() |
![]() |
![]() |
|
DX11 GET DEFAULT VERTEX SHADER
Retrieves a simple default vertex shader loaded by the engine at startup. struct vs_in { The last two matrices in the input struct are important to take note of; these are supplied to all vertex shaders by the engine, so you will need to have them at the end of all your vertex input structs. Take note that they are automatically appended to the end of your vertex layouts so you should not include them there however. The reason for sending these as part of the vertex input data is that it is the only way (besides a large array in a cbuffer) to provide per-instance data. The engine will pre-calculate these and add them to all objects; they are in fact not provided per vertex but rather (as you would expect) per instance so you don't have to worry about any extraneous bandwidth usage for sending these. For the sake of coherence, non-instanced objects are considered as single instances so this is the way to get the world / world view projection matrices for all meshes you render.
Return Dword = DX11 GET DEFAULT VERTEX SHADER()
This function does not take any parameters.
The default vertex shader.
VERTEXSHADER Functions Menu |
![]() |